Repository navigation
Conversation
dd48757 to
33a7215
Compare
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4955/ |
33a7215 to
dd48757
Compare
dd48757 to
539d8a5
Compare
539d8a5 to
dd48757
Compare
dd48757 to
17d827c
Compare
17d827c to
09dfcc0
Compare
| } | ||
|
|
||
| /* An open folder points its chevron down; the label no longer carries the group/label class this used. */ | ||
| .nav-folder > .peer > label:has(:checked) .nav-chevron { |
There was a problem hiding this comment.
Severity: P3 (Low)
Add a browser regression check that clicks a legacy folder toggle and verifies subtree visibility and chevron rotation on both open and close. The updated HTML snapshots would still pass if the new checked-state selector stopped matching and the chevron stayed sideways.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
There was a problem hiding this comment.
Leaving this one. I checked open and close in a browser against the previous markup (checkbox state, subtree visibility and chevron rotation all match), and the sidebar screenshots, with folders open, match pixel for pixel. A dedicated browser test for the toggle is more than this markup change needs.
d46233d to
e49ae66
Compare
e49ae66 to
a507da9
Compare
| } | ||
|
|
||
| :where(.nav-folder > .peer > label) { | ||
| @apply mr-2 flex items-start; |
There was a problem hiding this comment.
Severity: P3 (Low)
Add a browser regression test that clicks below the chevron on a wrapped folder row and checks that the subtree opens and closes. The HTML snapshots cannot detect a return to a chevron-height hit area, and a test that clicks the chevron itself would pass either way.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
There was a problem hiding this comment.
Leaving this one. I checked it in a browser when making the change: on a wrapped folder title the label measures 22×34 as on main, and a click 3px above the bottom of the row toggles the folder. A browser test for one CSS rule is more than this markup change needs.
cff0079 to
a369c79
Compare
a369c79 to
6bc3c8b
Compare
6bc3c8b to
284d00f
Compare
284d00f to
7939c2f
Compare
Each folder and heading row in the legacy sidebar repeated `peer grid grid-cols-[1fr_auto] w-full` on its title row, and `group/label flex mr-2 items-start` plus a `nav-toggle-btn` div around the chevron in its toggle. The row keeps `peer`, the label becomes the button, and `styles.css` sets the grid, the label's place, its button look and the open chevron's rotation. Island rows keep their markup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With self-start, a wrapped folder title left the area below the chevron unclickable. The label fills the row as it did with the old wrapper, and the chevron carries the padded hover box the inner div used to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7939c2f to
92e139e
Compare
Folder and heading rows in the sidebar no longer repeat their layout classes, and their toggle loses a wrapper element. The API sidebar is another 3–4% smaller, and it looks and behaves the same.
Affects: Site UI, API reference
Stack: 2 of 4, on top of #4953, under #4956.
Prompt summary: Stack the third sidebar markup step on top of #4953: a lighter folder toggle. The three PRs come from the sidebar analysis for elastic/docs-eng-team#1183, which is about bringing API pages under Googlebot's 2 MB HTML limit.
Why
Folder rows take about 500 bytes each, and the Kibana API sidebar has 72 of them on every page. Each title row repeated
peer grid grid-cols-[1fr_auto] w-full. Each toggle repeatedgroup/label flex mr-2 items-starton its label and wrapped its chevron in adiv.nav-toggle-btn.What
The title row keeps only
peerpages-nav.tsand the CSS that opens a subtree both find the row throughpeer, so it stays. A rule in Tailwind'sutilitieslayer, at no specificity, applies the grid the classes set.The label is the button
The chevron now sits directly in the
label. The label fills the row height, as it did with the old classes, so on a title that wraps to two lines a click below the chevron still toggles the folder. The chevron takes the padding, rounding and hover background the.nav-toggle-btnwrapper had, so the button box stays 22×22 at the top of the row.The open chevron follows the label's checkbox
The chevron's open rotation keyed on the
group/labelclass. It now keys on.nav-folder > .peer > label:has(:checked).Nothing that the expand and collapse logic reads changes. That logic is
pages-nav.tsandNavigationCurrentMarker, and it reads the checkbox,.peer,li.nav-folderand.nav-subtree-clip. Island rows, which link out with a double chevron and have no checkbox, keep their markup.Results
An isolated build of
docs/:mainoperation-osquerydeletepacks)operation-reindex)This is less than the analysis estimated (18 KB per Kibana sidebar). That estimate replaced the whole toggle with one checkbox, which would change how it is clicked and styled.
Compared with #4953's build:
/syntax/tabs. This covers desktop and tablet size, with folders as loaded and with every folder open.Out of scope: the
NAVIGATION_PREVIEWstyles inpages-nav-figma.css. They key on.peer,.nav-chevronand the checkbox, which this PR keeps, but I did not screenshot that flag.Verify
Check on the preview
🤖 Generated with Claude Code